# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ohrwurm
pkgver=1.7a1182a
pkgrel=1
groups=('blackarch' 'blackarch-fuzzer')
pkgdesc='A small and simple RTP fuzzer.'
url='http://mazzoo.de/'
arch=('x86_64' 'aarch64')
license=('GPL')
depends=('glibc' 'libpcap')
makedepends=('git')
source=("git+https://github.com/mazzoo/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i "s|-Wall|$CFLAGS|g" Makefile
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README
}

